﻿@import '../_variables';

$panel-width: 30%;
$panel-mobile-width: 75%;
$toolbar-height: 30px;

$tool-btn-icon-font-size: 15px;
$tool-btn-text-font-size: 14px;
$notif-icon-font-size: 14px;
$notif-text-font-size: 13px;
$notif-text-empty-font-size: 16px;

$panel-back-color: #111;
$panel-fore-color: $main-menu-fore-color;
$panel-fore-color-dark: $main-menu-fore-color-dark;
$panel-item-hover-back-color: $main-menu-item-hover-back-color;
$panel-item-hover-fore-color: $main-menu-item-hover-fore-color;
$panel-opacity: 0.97;
$notif-fore-color: $main-menu-fore-color;
$notif-btn-fore-color: $main-menu-fore-color-dark;

$info-color: $info;
$warning-color: $warning;
$error-color: $danger;

/********** Notification Panel **********/
.notif-panel {
    background-color: $panel-back-color;
    bottom: 0;
    color: $panel-fore-color;
    opacity: $panel-opacity;
    overflow-x: hidden;
    overflow-y: auto;
    padding: $toolbar-height 0 0;
    position: fixed;
    right: 0;
    width: $panel-width;
    z-index: $zindex-notif;

    &.hidden {
        display: none;
    }

    &.mobile {
        width: $panel-mobile-width;
    }
}

/********** Toolbar **********/
.notif-panel .notif-toolbar {
    height: $toolbar-height;
    padding-left: 5px;
    position: absolute;
    top: 0;

    .notif-tool-btn {
        cursor: pointer;
        display: inline-block;
        font-size: $tool-btn-text-font-size;
        height: $toolbar-height;
        line-height: $toolbar-height;
        margin: 0 5px 0 0;
        padding: 0 10px;
        white-space: nowrap;

        &.disabled {
            color: $panel-fore-color-dark;
            cursor: not-allowed;
        }

        &:hover {
            background-color: $panel-item-hover-back-color;
            color: $panel-item-hover-fore-color;
            text-decoration: none;
        }

        i {
            font-size: $tool-btn-icon-font-size;
            margin-right: 5px;
        }
    }
}

body {
    &:not(.header-visible) {
        .notif-panel {
            padding-top: $header-height + $toolbar-height;

            .notif-toolbar {
                top: $header-height;
            }
        }
    }
}

/********** Notification **********/
.notif-panel .notif {
    color: $notif-fore-color;
    font-size: $notif-text-font-size;
    margin: 0 5px 5px 15px;

    a,
    a:active,
    a:focus,
    a:visited {
        text-decoration: underline;
    }

    a:hover {
        color: $panel-item-hover-fore-color;
        text-decoration: underline;
    }

    &.empty {
        font-size: $notif-text-empty-font-size;
    }

    &.hidden {
        display: none;
    }

    .notif-icon {
        float: left;
        font-size: $notif-icon-font-size;

        .info {
            color: $info-color;
        }

        .warning {
            color: $warning-color;
        }

        .error {
            color: $error-color;
        }
    }

    .notif-time,
    .notif-msg {
        margin-left: 25px;
    }

    .notif-btn {
        color: $notif-btn-fore-color;
        margin: 0 10px 0 -10px;
        padding: 5px 10px;
    }
}

/********** Bell **********/
.notif-bell {
    &.info {
        color: $info-color;
    }

    &.warning {
        color: $warning-color;
    }

    &.error {
        color: $error-color;
    }
}
